﻿using System;
using System.Collections.Generic;
//using System.ComponentModel.Composition;
using System.Drawing;
using System.Drawing.Drawing2D;
////using System.Linq;
using System.Text;
////using System.Threading.Tasks;
using TRicheControl.DefaultControlStyles.Helper;
using TRicheControl.Interface.ControlStyle;

namespace TRicheControl.DefaultControlStyles
{
    //[Export(typeof(IRadioButtonStyle))]
    public class RadioButtonStyle : IRadioButtonStyle
    {
        private Pen mDarwEanbelRadioBorderPen;
        private Pen mDarwUnEanbelRadioBorderPen;
        private SolidBrush mDarwEanbelRadioBrush;
        private SolidBrush mDarwUnEanbelRadioBrush;
        private int mPadding = 2;

        public RadioButtonStyle()
        {
            mDarwEanbelRadioBorderPen = new Pen(Color.Black);
            mDarwUnEanbelRadioBorderPen = new Pen(Color.DarkGray);
            mDarwEanbelRadioBrush = new SolidBrush(Color.Blue);
            mDarwUnEanbelRadioBrush = new SolidBrush(Color.DarkGray);
        }

        public void DrawEanbelCheckRadio(System.Drawing.Graphics g, System.Drawing.Rectangle radiorect)
        {
            DrawHelper.SetGraphics(g);
            g.DrawEllipse(mDarwEanbelRadioBorderPen, radiorect);
            g.FillEllipse(mDarwEanbelRadioBrush, new Rectangle(radiorect.X + mPadding, radiorect.Y + mPadding, radiorect.Width - (mPadding * 2), radiorect.Height - (mPadding * 2)));
        }

        public void DrawEanbelUnCheckRadio(System.Drawing.Graphics g, System.Drawing.Rectangle radiorect)
        {
            DrawHelper.SetGraphics(g);
            g.DrawEllipse(mDarwEanbelRadioBorderPen, radiorect);
        }

        public void DrawUnEanbelCheckRadio(System.Drawing.Graphics g, System.Drawing.Rectangle radiorect)
        {
            DrawHelper.SetGraphics(g);
            g.DrawEllipse(mDarwEanbelRadioBorderPen, radiorect);
            g.FillEllipse(mDarwUnEanbelRadioBrush, new Rectangle(radiorect.X + mPadding, radiorect.Y + mPadding, radiorect.Width - (mPadding * 2), radiorect.Height - (mPadding * 2)));
        }

        public void DrawUnEanbelUnCheckRadio(System.Drawing.Graphics g, System.Drawing.Rectangle radiorect)
        {
            DrawHelper.SetGraphics(g);
            g.DrawEllipse(mDarwUnEanbelRadioBorderPen, radiorect);
        }

        public void DrawString(string text, Font textFont, Color textColor, System.Drawing.Graphics g, System.Drawing.Rectangle rect)
        {
            DrawHelper.SetGraphics(g);
            g.DrawString(text, textFont, new SolidBrush(textColor), rect);
        }

        public void DrawBackColor(System.Drawing.Graphics g, System.Drawing.Rectangle rect, System.Drawing.Color color)
        {
            DrawHelper.SetGraphics(g);
        }

        public void DrawMouseEnterEanbelCheckRadio(Graphics g, Rectangle radiorect)
        {
        }

        public void DrawMouseEnterEanbelUnCheckRadio(Graphics g, Rectangle radiorect)
        {
        }

        public void DrawMouseEnterUnEanbelCheckRadio(Graphics g, Rectangle radiorect)
        {
        }

        public void DrawMouseEnterUnEanbelUnCheckRadio(Graphics g, Rectangle radiorect)
        {
        }

        public void DrawMouseDownEanbelCheckRadio(Graphics g, Rectangle radiorect)
        {
        }

        public void DrawMouseDownUnEanbelCheckRadio(Graphics g, Rectangle radiorect)
        {
        }

        public void DrawMouseDownEanbelUnCheckRadio(Graphics g, Rectangle radiorect)
        {
        }

        public void DrawMouseDownUnEanbelUnCheckRadio(Graphics g, Rectangle radiorect)
        {
        }

        public void DrawBackGroundImage(Graphics g, Image image, Rectangle rect, System.Windows.Forms.ImageLayout layout)
        {
            DrawHelper.SetGraphics(g);
        }
    }
}
